
var property = {
    data:[
        {
            title:'属性',
            rows:[
                {
                    label:'字体',edit:'font',text:'字体[宋体],字形[常规],大小[11],效果[无]',data:{font:'宋体',weight:'常规',size:11,
                        //css:{"font-family": "宋体","font-weight": "normal","font-style": "normal","font-size": "11px","text-decoration":"none"}
                        css:["宋体","normal","normal",11,"none"]
                    },name:'font'
                },
                {
                    label:'文本位置',edit:'select',value:'left',text:'靠左',name:'align',
                    values:[
                        {name:'靠左',value:'left'},
                        {name:'靠右',value:'right'},
                        {name:'居中',value:'center'}
                    ]
                },
                {
                    label:'控件位置',edit:'select',value:'fix',text:'固定',name:'contAlign',
                    values:[
                        {name:'固定',value:'fix'},
                        {name:'靠左',value:'left'},
                        {name:'靠右',value:'right'},
                        {name:'居中',value:'center'}
                    ]
                },
                {
                    label:'显示名称',edit:'text',text:'显示文本',name:'txt_name'
                },
                {
                    label:'是否套打',edit:'select',value:'0',text:'否',name:'taoda',
                    values:[
                        {name:'是',value:'1'},
                        {name:'否',value:'0'}
                    ]
                },
                {
                    label:'绑定数据',edit:'none',text:'',name:'data'
                },
                /*{
                    label:'绑定公式',edit:'formula',text:'',name:'formula'
                },*/
                {
                    label:'格式化字符串',edit:'format',text:'',name:'format'
                },
                {
                    label:'显示层次',edit:'number',text:'1',name:'index'
                },
                {
                    label:'高度(像素)',edit:'number',text:'1',name:'height'
                },
                {
                    label:'宽度(像素)',edit:'number',text:'1',name:'width'
                },
                {
                    label:'位置X(像素)',edit:'number',text:'1',name:'x'
                },
                {
                    label:'位置Y(像素)',edit:'number',text:'1',name:'y'
                }
            ]
        }
    ]
};

var defaultProperty = {
    font:["宋体","normal","normal",11,"none",'字体[宋体],字形[常规],大小[11],效果[无]'],
    align:{value:'left',text:'靠左'},contAlign:{value:'fix',text:'固定'},
    txt_name:'显示文本',taoda:{value:'0',text:'否'},data:'',
    /*formula:'',*/
    format:'',
    index:1,height:-1,width:-1,x:-1,y:-1};

var whole = {
    data:[
        {
            title:'布局属性',
            rows:[
                {
                    label:'纸张类型',name:'paperType',
                    edit:'select',value:'A42',text:'A4二等分',
                    values:[
                        {name:'A4',value:'A4',selected:true},
                        {name:'A4二等分',value:'A42'}
                    ]
                },
                {
                    label:'高度(毫米)',edit:'number',text:'148.5',name:'height'
                },
                {
                    label:'宽度(毫米)',edit:'number',text:'210',name:'width'
                },
                {
                    label:'是否套打',edit:'select',value:'0',text:'否',name:'taoda',
                    values:[
                        {name:'是',value:'1'},
                        {name:'否',value:'0',selected:true}
                    ]
                }
            ]
        }
    ]
};

var defaultTable = {font:["宋体","normal","normal",11,"none"],table:[],headHeight:40,bodyHeight:40,
    headFont:["宋体","normal","normal",11,"none",'字体[宋体],字形[常规],大小[11] 效果[无]'],
    font:["宋体","normal","normal",11,"none",'字体[宋体],字形[常规],大小[11] 效果[无]'],
    showTitle:1,tableBorderWidth:1,tableBorderStyle:1,taoda:0,index:1};

var table = {
    data:[
        {
            title:'表格属性',
            rows:[
                {
                    label:'表格编辑',edit:'table',text:'编辑表格',name:'table'
                },
                {
                    label:'表头行高',edit:'number',text:'40',name:'headHeight'
                },
                {
                    label:'表体行高',edit:'number',text:'40',name:'bodyHeight'
                },
                {
                    label:'表头字体',edit:'font',text:'字体[宋体],字形[常规],大小[11]',data:{font:'宋体',weight:'常规',size:11,
                        css:["宋体","normal","normal",11,"none"]
                    },name:'headFont'
                },
                {
                    label:'表体字体',edit:'font',text:'字体[宋体],字形[常规],大小[11]',data:{font:'宋体',weight:'常规',size:11,
                        css:["宋体","normal","normal",11,"none"]
                    },name:'font'
                },
                {
                    label:'显示表头',edit:'select',value:'1',text:'是',name:'showTitle',
                    values:[
                        {name:'是',value:'1'},
                        {name:'否',value:'0'}
                    ]
                },
                {
                    label:'表格边框宽度',edit:'number',text:'1',name:'tableBorderWidth'
                },
                {
                    label:'表格边框类型',edit:'select',value:'1',text:'solid',name:'tableBorderStyle',
                    values:[
                        {name:'solid',value:'1'},
                        {name:'dotted',value:'2'},{name:'dashed',value:'3'}
                    ]
                },
                {
                    label:'是否套打',edit:'select',value:'0',text:'否',name:'taoda',
                    values:[
                        {name:'是',value:'1'},
                        {name:'否',value:'0'}
                    ]
                },
                {
                    label:'显示层次',edit:'number',text:'1',name:'index'
                },
                {
                    label:'高度(像素)',edit:'number',text:'230',name:'height'
                },
                {
                    label:'宽度(像素)',edit:'number',text:'666',name:'width'
                },
                {
                    label:'位置X(像素)',edit:'number',text:'1',name:'x'
                },
                {
                    label:'位置Y(像素)',edit:'number',text:'1',name:'y'
                }
            ]
        }
    ]
};

var vendor = [
    {name:'供应商名称',value:'vendor.name',demo:'张三'},
    {name:'供应商编码',value:'vendor.code',demo:'010203'},
    {name:'供应商联系人',value:'vendor.contact',demo:'李四'},
    {name:'供应商电话',value:'vendor.contactPhone',demo:'138****1234'},
    {name:'供应商地址',value:'vendor.address'}
];

var customer = [
    {name:'客户名称',value:'vendor.name',demo:'张三'},
    {name:'客户编码',value:'vendor.code',demo:'010203'},
    {name:'客户联系人',value:'vendor.contact',demo:'李四'},
    {name:'客户电话',value:'vendor.contactPhone',demo:'138****1234'},
    {name:'客户地址',value:'vendor.address'}
];

var company = [
    {name:'所属机构',value:'company.name'},
    {name:'机构联系人',value:'company.contact'},
    {name:'机构联系方式',value:'company.contactPhone'}
];

var user = [
    {name:'制单人',value:'user.name'},
    {name:'制单联系人',value:'user.name'},
    {name:'制单联系方式',value:'user.phone'}
];

var product = [
    {name:'商品名称',value:'product.name'},
    {name:'商品条码',value:'product.barcode'},
    {name:'商品编码',value:'product.code'},
    {name:'商品规格',value:'product.model'},
    {name:'商品分类',value:'productType.name'},
    {name:'商品备注',value:'product.comments'}
];

var unit = [
    {name:'单位名称',value:'product.name'}
];

var store = [
    {name:'仓库',value:'store.name'},
    {name:'仓库联系人',value:'store.contact'},
    {name:'仓库联系电话',value:'store.contactPhone'},
    {name:'仓库地址',value:'store.address'}
];

var order = [
    {name:'单据编号',value:'order.code'},
    {name:'创建时间',value:'order.createTime'},
    {name:'单据日期',value:'order.date'},
    {name:'订单金额',value:'order.dueMoney'},
    {name:'本次付款',value:'order.realMoney'},
    {name:'优惠金额',value:'order.discountMoney'},
    {name:'本次欠款',value:'order.debtMoney'},
    {name:'订单备注',value:'order.remarks'}
];

var orderDetail = [
    {name:'序号',value:'serialnumber'},
    {name:'批次号',value:'orderDetail.batchNo'},
    {name:'生产日期',value:'orderDetail.productionDate'},
    {name:'保质期',value:'orderDetail.shelfLife'},
    {name:'单价',value:'orderDetail.price'},
    {name:'数量',value:'orderDetail.number'},
    {name:'折扣率%',value:'orderDetail.discountRate'},
    {name:'折扣额',value:'orderDetail.discountMoney'},
    {name:'折后金额',value:'orderDetail.discountPrice'},
    {name:'备注',value:'orderDetail.remarks'}
];

var ordersData = {
    orders:[
        {
            id:1,
            title:'采购单',
            order:[
                [
                    {name:'登陆人',value:'login.userName'},
                    {name:'登陆公司',value:'login.companyName'},
                    {name:'打印时间',value:'print.nowtime'},
                    {name:'结算账户',value:'account.name'},
                    {name:'采购费用',value:'order.purPrice'}
                ],
                [
                    order,company,user,vendor,customer
                ]
            ],
            orderDetail:[
                [

                ],
                [product,company,store,unit,orderDetail]
            ]
        },
        {
            title:'调拨单',
            order:[
                [
                    {name:'单据编号',value:'transfer.code'},
                    {name:'单据日期',value:'transfer.date'},
                    {name:'备注',value:'transfer.remarks'}
                ],
                [
                    company,user
                ]
            ],
            orderDetail:[
                [
                    {name:'序号',value:'serialnumber'},
                    {name:'调拨数量',value:'transferDetail.number'},
                    {name:'调出单价',value:'transferDetail.outPrice'},
                    {name:'调入单价',value:'transferDetail.inPrice'},
                    {name:'调拨备注',value:'transferDetail.remarks'}
                ],
                [product,company,store,unit]
            ]
        },
        {
            title:'成本调整单',
            order:[
                [
                    {name:'单据编号',value:'cost.code'},
                    {name:'单据日期',value:'cost.date'},
                    {name:'成本调整备注',value:'cost.remarks'}
                ],
                [
                    vendor,company,user
                ]
            ],
            orderDetail:[
                [
                    {name:'序号',value:'serialnumber'},
                    {name:'调整金额',value:'costDetail.price'},
                    {name:'成本调整备注',value:'costDetail.remarks'}

                ],
                [product,company,store]
            ]
        },
        {
            title:'其它入库单',
            order:[
                [
                    {name:'单据编号',value:'otherin.code'},
                    {name:'单据日期',value:'otherin.date'},
                    {name:'其它入库备注',value:'otherin.remarks'}
                ],
                [
                    vendor,company,user
                ]
            ],
            orderDetail:[
                [
                    {name:'序号',value:'serialnumber'},
                    {name:'入库数量',value:'otherinDetail.number'},
                    {name:'其它入库单价',value:'costDetail.price'}
                ],
                [product,company,store]
            ]
        },
        {
            title:'其它出库单',
            order:[
                [
                    {name:'单据编号',value:'otherin.code'},
                    {name:'单据日期',value:'otherin.date'},
                    {name:'其它出库备注',value:'otherin.remarks'}
                ],
                [
                    vendor,company,user
                ]
            ],
            orderDetail:[
                [
                    {name:'序号',value:'serialnumber'},
                    {name:'出库数量',value:'otherinDetail.number'},
                    {name:'其它出库单价',value:'costDetail.price'}
                ],
                [product,company,store]
            ]
        }
    ]
};

var formats = [
    {value:'yyyy-MM-dd',comments:'2018-08-08',type:1},
    {value:'yyyy年MM月dd日',comments:'2018年08月08日',type:2},
    {value:'yyyy-MM-dd HH:mm:ss',comments:'2018-08-08 08:08:08',type:3},
    {value:'yyyy年MM月dd日 HH时mm分ss秒',comments:'2018年08月08日 08时08分08秒',type:4},
    {value:'###,###.00',comments:'8,000.00',type:5},
    {value:'￥###,###.00',comments:'￥8,000.00',type:6},
    {value:'$###,###.00',comments:'$8,000.00',type:7},
    {value:'###,###',comments:'8,000',type:8},
    {value:'数字大写',comments:'捌仟圆整',type:9}
];